// 维护备件采购计划
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询备件采购计划主列表
export const queryPurchasePlanList = params => axios.get(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/getList`, { params });

// 新建备件采购计划
export const createOrderPurchasePlan = params => axios.post(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/createPartPurchaseOrder`, params);

// 编辑采购计划
export const updatePurchasePlane = params => axios.post(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/modifyPartPurchaseOrder`, params);

// 备件采购计划预览
export const previewPurchasePlan = params => axios.get(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/partPurchasePlanPreview`, { params });

// 根据单据id查询单据详情
export const queryBillDetailById = params => axios.get(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/getOrderPlanById`, { params });

// 根据单据id查询单据列表详情
export const queryBillPartDetailById = params => axios.get(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/getOrderPlanItemList`, { params });

// 查询所有员工
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

// 批量删除备件采购计划
export const deletePartPurhcasePlan = params => axios.get(`${SERVER.DMSCLOUD_PART}/partPurchasePlan/deleteItems`, { params });
